package com.ruoyi.apis.service.impl;

import com.ruoyi.apis.entity.BannerEntity;
import com.ruoyi.apis.repository.BannerRepository;
import com.ruoyi.apis.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Choi
 * @Date 2021/7/19
 */

@Service
public class BannerServiceImpl implements BannerService {

    @Autowired
    private BannerRepository bannerRepository;

    @Override
    public List<BannerEntity> getBanners() {
        return bannerRepository.findAllByOrderBySortAsc();
    }
}
